#if defined _psyrtd_included_
	#endinput
#endif
#define _psy_included_

#define PSYRTDAPIVERSION 1

#define psyRTDEffectType_Bad 0
#define psyRTDEffectType_Good 1

enum psyRTDAction {
	psyRTD_Continue,
	psyRTD_Reroll
};

enum psyRTDGame {
	psyRTDGame_Unknown = -1,
	psyRTDGame_CSS,
	psyRTDGame_DODS,
	psyRTDGame_L4D,
	psyRTDGame_L4D2,
	psyRTDGame_TF,
	psyRTDGame_HL2MP,
	psyRTDGame_INSMOD,
	psyRTDGame_FF,
	psyRTDGame_ZPS,
	psyRTDGame_AOC,
	psyRTDGame_FOF,
	psyRTDGame_GES
};

functag psyRTDEffectCallback psyRTDAction:public(client);

/**
 * Register an RTD effect
 * 
 * @param effectType		Type of effect: good, bad or random.
 * @param func			Callback to use for RTD effect.
 * @return			RTD effect id to use when unregistering.
 */
native psyRTD_RegisterEffect(type, const String:name[], const String:desc[], psyRTDEffectCallback:callback);

/**
 * Unregister an RTD effect (will be done automatically on plugin unload)
 *
 * @param iRTDEffectId		The RTD effect id to remove.
 * @return			Nothing.
 */
native psyRTD_UnregisterEffect(iRTDEffectId);

/**
 * Get game that server is running
 *
 * @return			Server game.
 */
native psyRTDGame:psyRTD_GetGame();


/**
 * Get the effect count
 * 
 * @return			effect count
 */
native psyRTD_GetEffectCount();

/**
 * Get the id of an effect (index of the effectarray is different than the effectid!)
 * 
 * @param iIndex		The RTD effect id to remove.
 * @return			effect id
 */
native psyRTD_GetEffectID(iIndex);

/**
 * Get the name of an effect
 * 
 * @param iRTDEffectId		The RTD effect id to remove.
 * @return			effect name
 */
native psyRTD_GetEffectName(iRTDEffectId, String:effectName[]);

/**
 * Get the description of an effect
 * 
 * @param iRTDEffectId		The RTD effect id to remove.
 * @return			effect description
 */
native psyRTD_GetEffectDescription(iRTDEffectId, String:effectDesc[]);

/**
 * Apply a random effect to a client
 * 
 * @param iClient		The client the effect will be applied on
 * @param effectType		Type of effect: good, bad or random. 
 * @return			The id of the effect applied to the client, 
 * 				or -1 if no effect is possible for the client.
 */
native psyRTD_DoRandomEffect(iClient, effectType);


/**
 * Apply an effect to a client
 * 
 * @param iClient		The client the effect will be applied on
 * @param iRTDEffectId		The RTD effect id to remove.
 * @return			psyRTDAction. OK or FAIL
 */
native psyRTDAction:psyRTD_DoEffect(iClient, iRTDEffectId);



/**
 * An effect has finished
 * 
 * @param iClient		The client who doesnt have an effect anymore
 * @param iRTDEffectId		The RTD effect id to remove.
 */
native psyRTD_EffectIsNowDisabled(iClient, iRTDEffectId);





forward psyRTD_DisableEffect(iClient,iRTDEffectId);